current view in module

Hi,

I have a module with i views and each view contains j columns.
I want to check for all i views if there is a column displaying the attribute attA.
A message will write if the view contains a column displaying attA.

I tried to have a code but the loop to scroll the J columns applies only for the CURRENT view !!! I must change the current view to scroll the other views.

void main {
AttrDef attDef = find(m, "attA")
if (!null (attDef)){
Object o
Module m = current
for o in m do{
bool bA = o."attA"
if (bA == true){
o."attB" = "True"
}
else{
continue
}
}
string name
Column c
int i =0
for name in views m do{
print name "\n"
for c in m do{
print "<">\n"
if ((attrName c) == "attA"){
print "There is a column displaying " attA "in the view " name "\n\n"
}
else {
print "There is no column displaying " attA "in the view " name "\n\n"
continue
}
}
}
}
}
Can someone help me please?
Estebell - Wed Jun 27 11:15:35 EDT 2012

Re: current view in module
llandale - Wed Jun 27 16:00:44 EDT 2012

Unfortunately you cannot manage views directly, only the current view. You thus need to load each view. I think you need
  • load(view(name))
above your column loop.

-Louie

Re: current view in module
Estebell - Thu Jun 28 10:51:27 EDT 2012

ok, thank's it is working !

Best regards.